\(\int \cot ^5(c+d x) \csc ^3(c+d x) (a+b \sin (c+d x)) \, dx\) [1210]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F(-1)]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 27, antiderivative size = 65 \[ \int \cot ^5(c+d x) \csc ^3(c+d x) (a+b \sin (c+d x)) \, dx=-\frac {b \cot ^6(c+d x)}{6 d}-\frac {a \csc ^3(c+d x)}{3 d}+\frac {2 a \csc ^5(c+d x)}{5 d}-\frac {a \csc ^7(c+d x)}{7 d} \]

[Out]

-1/6*b*cot(d*x+c)^6/d-1/3*a*csc(d*x+c)^3/d+2/5*a*csc(d*x+c)^5/d-1/7*a*csc(d*x+c)^7/d

Rubi [A] (verified)

Time = 0.10 (sec) , antiderivative size = 65, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.185, Rules used = {2913, 2686, 276, 2687, 30} \[ \int \cot ^5(c+d x) \csc ^3(c+d x) (a+b \sin (c+d x)) \, dx=-\frac {a \csc ^7(c+d x)}{7 d}+\frac {2 a \csc ^5(c+d x)}{5 d}-\frac {a \csc ^3(c+d x)}{3 d}-\frac {b \cot ^6(c+d x)}{6 d} \]

[In]

Int[Cot[c + d*x]^5*Csc[c + d*x]^3*(a + b*Sin[c + d*x]),x]

[Out]

-1/6*(b*Cot[c + d*x]^6)/d - (a*Csc[c + d*x]^3)/(3*d) + (2*a*Csc[c + d*x]^5)/(5*d) - (a*Csc[c + d*x]^7)/(7*d)

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 276

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*(a + b*x^n)^p,
 x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0]

Rule 2686

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a/f, Subst[
Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n -
1)/2] &&  !(IntegerQ[m/2] && LtQ[0, m, n + 1])

Rule 2687

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(b*x)
^n*(1 + x^2)^(m/2 - 1), x], x, Tan[e + f*x]], x] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2] &&  !(IntegerQ[(n
- 1)/2] && LtQ[0, n, m - 1])

Rule 2913

Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]),
 x_Symbol] :> Dist[a, Int[Cos[e + f*x]^p*(d*Sin[e + f*x])^n, x], x] + Dist[b/d, Int[Cos[e + f*x]^p*(d*Sin[e +
f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n, p}, x] && IntegerQ[(p - 1)/2] && IntegerQ[n] && ((LtQ[p, 0]
&& NeQ[a^2 - b^2, 0]) || LtQ[0, n, p - 1] || LtQ[p + 1, -n, 2*p + 1])

Rubi steps \begin{align*} \text {integral}& = a \int \cot ^5(c+d x) \csc ^3(c+d x) \, dx+b \int \cot ^5(c+d x) \csc ^2(c+d x) \, dx \\ & = -\frac {a \text {Subst}\left (\int x^2 \left (-1+x^2\right )^2 \, dx,x,\csc (c+d x)\right )}{d}-\frac {b \text {Subst}\left (\int x^5 \, dx,x,-\cot (c+d x)\right )}{d} \\ & = -\frac {b \cot ^6(c+d x)}{6 d}-\frac {a \text {Subst}\left (\int \left (x^2-2 x^4+x^6\right ) \, dx,x,\csc (c+d x)\right )}{d} \\ & = -\frac {b \cot ^6(c+d x)}{6 d}-\frac {a \csc ^3(c+d x)}{3 d}+\frac {2 a \csc ^5(c+d x)}{5 d}-\frac {a \csc ^7(c+d x)}{7 d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 65, normalized size of antiderivative = 1.00 \[ \int \cot ^5(c+d x) \csc ^3(c+d x) (a+b \sin (c+d x)) \, dx=-\frac {b \cot ^6(c+d x)}{6 d}-\frac {a \csc ^3(c+d x)}{3 d}+\frac {2 a \csc ^5(c+d x)}{5 d}-\frac {a \csc ^7(c+d x)}{7 d} \]

[In]

Integrate[Cot[c + d*x]^5*Csc[c + d*x]^3*(a + b*Sin[c + d*x]),x]

[Out]

-1/6*(b*Cot[c + d*x]^6)/d - (a*Csc[c + d*x]^3)/(3*d) + (2*a*Csc[c + d*x]^5)/(5*d) - (a*Csc[c + d*x]^7)/(7*d)

Maple [A] (verified)

Time = 0.36 (sec) , antiderivative size = 73, normalized size of antiderivative = 1.12

method result size
derivativedivides \(-\frac {\frac {\left (\csc ^{7}\left (d x +c \right )\right ) a}{7}+\frac {b \left (\csc ^{6}\left (d x +c \right )\right )}{6}-\frac {2 \left (\csc ^{5}\left (d x +c \right )\right ) a}{5}-\frac {b \left (\csc ^{4}\left (d x +c \right )\right )}{2}+\frac {\left (\csc ^{3}\left (d x +c \right )\right ) a}{3}+\frac {b \left (\csc ^{2}\left (d x +c \right )\right )}{2}}{d}\) \(73\)
default \(-\frac {\frac {\left (\csc ^{7}\left (d x +c \right )\right ) a}{7}+\frac {b \left (\csc ^{6}\left (d x +c \right )\right )}{6}-\frac {2 \left (\csc ^{5}\left (d x +c \right )\right ) a}{5}-\frac {b \left (\csc ^{4}\left (d x +c \right )\right )}{2}+\frac {\left (\csc ^{3}\left (d x +c \right )\right ) a}{3}+\frac {b \left (\csc ^{2}\left (d x +c \right )\right )}{2}}{d}\) \(73\)
parallelrisch \(-\frac {\left (a \sec \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\cos \left (2 d x +2 c \right )+\frac {5 \cos \left (4 d x +4 c \right )}{4}+\frac {57}{28}\right ) \csc \left (\frac {d x}{2}+\frac {c}{2}\right )+\frac {825 b \left (\cos \left (2 d x +2 c \right )+\frac {42 \cos \left (4 d x +4 c \right )}{55}+\frac {\cos \left (6 d x +6 c \right )}{15}+\frac {14}{11}\right )}{256}\right ) \left (\sec ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \left (\csc ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3840 d}\) \(107\)
risch \(\frac {\frac {8 i a \,{\mathrm e}^{11 i \left (d x +c \right )}}{3}+2 b \,{\mathrm e}^{12 i \left (d x +c \right )}+\frac {32 i a \,{\mathrm e}^{9 i \left (d x +c \right )}}{15}-2 b \,{\mathrm e}^{10 i \left (d x +c \right )}+\frac {304 i a \,{\mathrm e}^{7 i \left (d x +c \right )}}{35}+\frac {20 b \,{\mathrm e}^{8 i \left (d x +c \right )}}{3}+\frac {32 i a \,{\mathrm e}^{5 i \left (d x +c \right )}}{15}-\frac {20 b \,{\mathrm e}^{6 i \left (d x +c \right )}}{3}+\frac {8 i a \,{\mathrm e}^{3 i \left (d x +c \right )}}{3}+2 b \,{\mathrm e}^{4 i \left (d x +c \right )}-2 b \,{\mathrm e}^{2 i \left (d x +c \right )}}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{7}}\) \(157\)
norman \(\frac {-\frac {a}{896 d}+\frac {a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{280 d}+\frac {a \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{480 d}-\frac {a \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{24 d}-\frac {5 a \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{64 d}-\frac {a \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{24 d}+\frac {a \left (\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{480 d}+\frac {a \left (\tan ^{14}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{280 d}-\frac {a \left (\tan ^{16}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{896 d}-\frac {b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{384 d}+\frac {5 b \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{384 d}-\frac {3 b \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{128 d}-\frac {3 b \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{128 d}+\frac {5 b \left (\tan ^{13}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{384 d}-\frac {b \left (\tan ^{15}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{384 d}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7} \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\) \(271\)

[In]

int(cos(d*x+c)^5*csc(d*x+c)^8*(a+b*sin(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

-1/d*(1/7*csc(d*x+c)^7*a+1/6*b*csc(d*x+c)^6-2/5*csc(d*x+c)^5*a-1/2*b*csc(d*x+c)^4+1/3*csc(d*x+c)^3*a+1/2*b*csc
(d*x+c)^2)

Fricas [A] (verification not implemented)

none

Time = 0.36 (sec) , antiderivative size = 106, normalized size of antiderivative = 1.63 \[ \int \cot ^5(c+d x) \csc ^3(c+d x) (a+b \sin (c+d x)) \, dx=\frac {70 \, a \cos \left (d x + c\right )^{4} - 56 \, a \cos \left (d x + c\right )^{2} + 35 \, {\left (3 \, b \cos \left (d x + c\right )^{4} - 3 \, b \cos \left (d x + c\right )^{2} + b\right )} \sin \left (d x + c\right ) + 16 \, a}{210 \, {\left (d \cos \left (d x + c\right )^{6} - 3 \, d \cos \left (d x + c\right )^{4} + 3 \, d \cos \left (d x + c\right )^{2} - d\right )} \sin \left (d x + c\right )} \]

[In]

integrate(cos(d*x+c)^5*csc(d*x+c)^8*(a+b*sin(d*x+c)),x, algorithm="fricas")

[Out]

1/210*(70*a*cos(d*x + c)^4 - 56*a*cos(d*x + c)^2 + 35*(3*b*cos(d*x + c)^4 - 3*b*cos(d*x + c)^2 + b)*sin(d*x +
c) + 16*a)/((d*cos(d*x + c)^6 - 3*d*cos(d*x + c)^4 + 3*d*cos(d*x + c)^2 - d)*sin(d*x + c))

Sympy [F(-1)]

Timed out. \[ \int \cot ^5(c+d x) \csc ^3(c+d x) (a+b \sin (c+d x)) \, dx=\text {Timed out} \]

[In]

integrate(cos(d*x+c)**5*csc(d*x+c)**8*(a+b*sin(d*x+c)),x)

[Out]

Timed out

Maxima [A] (verification not implemented)

none

Time = 0.21 (sec) , antiderivative size = 70, normalized size of antiderivative = 1.08 \[ \int \cot ^5(c+d x) \csc ^3(c+d x) (a+b \sin (c+d x)) \, dx=-\frac {105 \, b \sin \left (d x + c\right )^{5} + 70 \, a \sin \left (d x + c\right )^{4} - 105 \, b \sin \left (d x + c\right )^{3} - 84 \, a \sin \left (d x + c\right )^{2} + 35 \, b \sin \left (d x + c\right ) + 30 \, a}{210 \, d \sin \left (d x + c\right )^{7}} \]

[In]

integrate(cos(d*x+c)^5*csc(d*x+c)^8*(a+b*sin(d*x+c)),x, algorithm="maxima")

[Out]

-1/210*(105*b*sin(d*x + c)^5 + 70*a*sin(d*x + c)^4 - 105*b*sin(d*x + c)^3 - 84*a*sin(d*x + c)^2 + 35*b*sin(d*x
 + c) + 30*a)/(d*sin(d*x + c)^7)

Giac [A] (verification not implemented)

none

Time = 0.36 (sec) , antiderivative size = 70, normalized size of antiderivative = 1.08 \[ \int \cot ^5(c+d x) \csc ^3(c+d x) (a+b \sin (c+d x)) \, dx=-\frac {105 \, b \sin \left (d x + c\right )^{5} + 70 \, a \sin \left (d x + c\right )^{4} - 105 \, b \sin \left (d x + c\right )^{3} - 84 \, a \sin \left (d x + c\right )^{2} + 35 \, b \sin \left (d x + c\right ) + 30 \, a}{210 \, d \sin \left (d x + c\right )^{7}} \]

[In]

integrate(cos(d*x+c)^5*csc(d*x+c)^8*(a+b*sin(d*x+c)),x, algorithm="giac")

[Out]

-1/210*(105*b*sin(d*x + c)^5 + 70*a*sin(d*x + c)^4 - 105*b*sin(d*x + c)^3 - 84*a*sin(d*x + c)^2 + 35*b*sin(d*x
 + c) + 30*a)/(d*sin(d*x + c)^7)

Mupad [B] (verification not implemented)

Time = 11.40 (sec) , antiderivative size = 70, normalized size of antiderivative = 1.08 \[ \int \cot ^5(c+d x) \csc ^3(c+d x) (a+b \sin (c+d x)) \, dx=-\frac {105\,b\,{\sin \left (c+d\,x\right )}^5+70\,a\,{\sin \left (c+d\,x\right )}^4-105\,b\,{\sin \left (c+d\,x\right )}^3-84\,a\,{\sin \left (c+d\,x\right )}^2+35\,b\,\sin \left (c+d\,x\right )+30\,a}{210\,d\,{\sin \left (c+d\,x\right )}^7} \]

[In]

int((cos(c + d*x)^5*(a + b*sin(c + d*x)))/sin(c + d*x)^8,x)

[Out]

-(30*a + 35*b*sin(c + d*x) - 84*a*sin(c + d*x)^2 + 70*a*sin(c + d*x)^4 - 105*b*sin(c + d*x)^3 + 105*b*sin(c +
d*x)^5)/(210*d*sin(c + d*x)^7)